package command;

public class General {
    private Command attackCommand;
    private Command retreatCommand;

    public General() {
        Soldier soldier = new Soldier();
        Army army = new Army(soldier);
        retreatCommand = new RetreatCommand(army);
        attackCommand = new AttackCommand(army);
    }

    public void attack() {
        attackCommand.attack();
    }

    public void retreat() {
        retreatCommand.retreat();
    }
}
